package com.cskaoyan.shopping.controller;

import com.cskaoyan.mall.commons.result.ResponseData;
import com.cskaoyan.mall.commons.result.ResponseUtil;
import com.cskaoyan.shopping.dto.PanelContentDto;
import com.cskaoyan.shopping.service.INavigationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.LinkedList;
import java.util.List;

/**
 *
 * @since 2023/01/10 10:49
 * @author 2731235517@qq.com 谢畅
 */
@RestController
@RequestMapping("/shopping")
public class NavigationController {

    @Autowired
    INavigationService iNavigationService;

    @GetMapping("/navigation")
    public ResponseData navigation() {
        List<PanelContentDto> result = iNavigationService.listNavigation();
        return new ResponseUtil<>().setData(result);
    }
}
